package com.liqi;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@Slf4j
//扫描mybatis的接口
@MapperScan(basePackages = {"com.liqi.frame.comm.dao","com.liqi.biz.dao"})
@EnableSwagger2
//异步框架(在异步方法上加入@Async)
//@EnableAsync
public class FrameApplication {

	private static String port;
	@Value("${server.port}")
	public void setPort(String port){
		FrameApplication.port = port;
	}

	public static void main(String[] args) {
		System.setProperty("es.set.netty.runtime.available.processors","false");
		SpringApplication.run(FrameApplication.class, args);
		log.info("=====================================================\n" +
				" ==                                                 ==\n" +
				" ==                   服 务 已 启 动                 ==\n" +
				" ==               http://127.0.0.1:" + port + "             ==\n" +
				" ==                                                 ==\n" +
				" =====================================================");
	}

}
